refactor: centralize search route ownership#752
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughThe PR centralizes submitted-search route ownership in typed helpers, wires those helpers into ChangesSearch route ownership
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@copilot resolve the merge conflicts in this pull request |
Head branch was pushed to by a user without write access
Resolved the merge conflicts and merged the latest |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/therapy-compass-mode-wiring.test.ts`:
- Around line 29-33: Extend the therapy-compass test beyond direct
shouldRenderDashboardSearch coverage by asserting the rendered route wiring
through GlobalSearchShell (or its equivalent integration boundary). Verify that
/therapy-compass with a submitted query and run parameter renders
TherapyCompassPage and not ClinicalDashboard, while preserving the existing
helper assertion.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: d355878f-6f40-47bb-8f9e-0b3a6c587150
📒 Files selected for processing (6)
docs/branch-review-ledger.mddocs/frontend-architecture.mdsrc/components/clinical-dashboard/global-search-shell.tsxsrc/lib/search-route-ownership.tstests/search-route-ownership.test.tstests/therapy-compass-mode-wiring.test.ts
eb22c6e to
b7d71f8
Compare
Pull request was closed
Motivation
Description
src/lib/search-route-ownership.tsthat exposesshouldRenderDashboardSearchandshouldRenderClinicalDashboardand encodes the canonical set of route-owned modes.src/components/clinical-dashboard/global-search-shell.tsxto consume the new boundary instead of repeating mode/mocking/match conditionals, and simplifyautoRunSearchseeding.tests/search-route-ownership.test.tswith coverage for route-owned modes, dashboard-owned flows, medication detail routes, and mockups, and updatetests/therapy-compass-mode-wiring.test.tsto assert the new policy.docs/frontend-architecture.mdnotes the new responsibility, anddocs/branch-review-ledger.mdrecords the review entry.Testing
vitestontests/search-route-ownership.test.tsandtests/therapy-compass-mode-wiring.test.ts(2 files, 7 tests) and all passed.npm run verify:cheapcompleted successfully andnpm run verify:pr-localcompleted in this environment.npm run ensureand validatedhttp://localhost:3131/api/local-project-idreturned the project identity.npm run test:e2e:critical/npm run verify:uicould not complete because the isolated production Playwright build repeatedly failed to download required font assets fromfonts.gstatic.com, so the full Chromium UI gate was blocked.Codex Task
Summary by CodeRabbit